//
//  NewCurveLineChartView.h
//  CoollangTennisBall
//
//  Created by Coollang on 2017/8/29.
//  Copyright © 2017年 Coollang-YF. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <Charts/Charts-Swift.h>
#import "CoollangTennisBall-Swift.h"

typedef enum : NSUInteger {
    kTennisBaseStyle,
} kChartLineViewStyle;

typedef enum : NSUInteger {
    kAxisLeft,
    kAxisRight,
} kAxisType;

@interface CurveLineItem :NSObject
/** index */
@property (nonatomic, assign)NSInteger index;// 第几条
/** 线条颜色 */
@property (nonatomic, strong) UIColor *lineColor;

/** 是否显示Full */
@property (nonatomic, assign) BOOL showFull;

@property (nonatomic, strong) UIColor *fullColor;
/*注：xValues 可以不设置，但要设置的话个数必须与yValues相等*/
@property (nonatomic, strong) NSArray *xValues;
@property (nonatomic, strong) NSArray *yValues;

@property (nonatomic, assign)CGFloat lineWidth;

@property (nonatomic, assign)BOOL showHighlightLine;

@property (nonatomic, assign)BOOL showMarkLabel;

@property (nonatomic, copy)NSString *dataSet;

/* 数据坐标轴依照Y轴的那一边：默认左边 */
@property (nonatomic, assign) AxisDependency yAxisDependency;

- (instancetype)initWithLineWidth:(CGFloat)lineWidth color:(UIColor *)lineColor fullColor:(UIColor *)fullColor xValues:(NSArray *)xValues yValues:(NSArray *)yValues;

@end

@interface NewCurveLineChartView :UIView

/** 是否绘制 */
@property (nonatomic, assign)BOOL showXAxis;

@property (nonatomic, assign) kChartLineViewStyle style;

// 1.配置基本样式
- (void)ConfigerTheme:(kChartLineViewStyle)style ;

// 2.X轴上面需要显示的数据 -- 暂时用不了
- (void)configuerXAxisValus:(NSArray *)xValues;


// 3.带自适应的最大值最小值得Y轴设置
- (void)defaultSuitableSettingCompare:(CGFloat)minValue maxValue:(CGFloat)maxValue setAxis:(kAxisType)axisType labelCount:(NSInteger)count show:(BOOL)isShow drawGridLinesEnabled:(BOOL)drawGridLines axisLineColor:(UIColor *)axisColor;

// 4.画线
- (void)drawLineWithCurveLineItemArr:(NSArray <CurveLineItem *> *)lineItemes showAnimation:(BOOL)animation;

@end


